package core.rendering;

import java.awt.Graphics2D;
import java.awt.Image;


public class Sprite{
	
	AnimagedImage source;
	
	public Sprite (Image img){
		
		source = new AnimagedImage(img , 32 , 32);
	}
	
	public Sprite (Image img , int width , int height){
		
		source = new AnimagedImage(img , width , height);
	}
	public void render(Graphics2D g2d , int xrender , int yrender){
		g2d.drawImage(source.getNextFrame() ,xrender , yrender , null);
	}
	
	public int getWidth(){
		return source.getWidth();
	}
	
	public int getHeight(){
		return source.getHeight();
	}
}